<!doctype html>
<html class="no-js">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>ExposedAutoConfiguration</title>
<link href="../../../images/logo-icon.svg" rel="icon" type="image/svg">    <script>var pathToRoot = "../../../";</script>
    <script>document.documentElement.classList.replace("no-js","js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
    if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    } else {
        const savedDarkMode = JSON.parse(storage)
        if(savedDarkMode === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../styles/style.css" rel="Stylesheet">
<link href="../../../styles/main.css" rel="Stylesheet">
<link href="../../../styles/prism.css" rel="Stylesheet">
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../styles/font-jb-sans-auto.css" rel="Stylesheet">
<script type="text/javascript" src="../../../scripts/clipboard.js" async></script>
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer></script></head>
<body>
    <div class="root">
<nav class="navigation" id="navigation-wrapper">
    <div class="navigation--inner">
        <div class="navigation-title">
            <button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button>
            <div class="library-name">
<a class="library-name--link" href="../../../index.html">
                            exposed
                    </a>            </div>
            <div class="library-version">0.57.0
            </div>
        </div>
        <div class="filter-section" id="filter-section">
                <button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":exposed-spring-boot-starter:dokkaHtmlPartial/main">jvm</button>
        </div>
    </div>
    <div class="navigation-controls">
        <button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
        <div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
    </div>
</nav>
        <div id="container">
            <div class="sidebar" id="leftColumn">
                <div class="sidebar--inner" id="sideMenu"></div>
            </div>
            <div id="main">
<div class="main-content" data-page-type="classlike" id="content" pageids="exposed-spring-boot-starter::org.jetbrains.exposed.spring.autoconfigure/ExposedAutoConfiguration///PointingToDeclaration//1261506227">
  <div class="breadcrumbs"><a href="../../index.html">exposed-spring-boot-starter</a><span class="delimiter">/</span><a href="../index.html">org.jetbrains.exposed.spring.autoconfigure</a><span class="delimiter">/</span><span class="current">ExposedAutoConfiguration</span></div>
  <div class="cover ">
    <h1 class="cover"><span>Exposed</span><wbr><span>Auto</span><wbr><span><span>Configuration</span></span></h1>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-spring-boot-starter:dokkaHtmlPartial/main"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="org.springframework.boot.autoconfigure/AutoConfiguration///PointingToDeclaration/"><span class="token annotation builtin">AutoConfiguration</span></span><span class="token punctuation">(</span><span>after<span class="token operator"> = </span><span class="token punctuation">[</span><span><span data-unresolved-link="org.springframework.boot.autoconfigure.jdbc/DataSourceAutoConfiguration///PointingToDeclaration/">DataSourceAutoConfiguration::class</span></span><wbr><span class="token punctuation">]</span></span><wbr><span class="token punctuation">)</span></div><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="org.springframework.transaction.annotation/EnableTransactionManagement///PointingToDeclaration/"><span class="token annotation builtin">EnableTransactionManagement</span></span></div></div><span class="token keyword">open </span><span class="token keyword">class </span><a href="index.html">ExposedAutoConfiguration</a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">applicationContext<span class="token operator">: </span><span data-unresolved-link="org.springframework.context/ApplicationContext///PointingToDeclaration/">ApplicationContext</span></span></span><span class="token punctuation">)</span></div><p class="paragraph">Main configuration class for Exposed that can be automatically applied by Spring Boot.</p><p class="paragraph">This should be applied on a Spring configuration class using: <code class="lang-kotlin">@ImportAutoConfiguration(ExposedAutoConfiguration::class)</code></p><p class="paragraph"><strong>Note</strong> As part of the configuration, <code class="lang-kotlin">@EnableTransactionManagement</code> is added without setting any attributes. This means that all attributes have their default values, including <code class="lang-kotlin">mode = AdviceMode.PROXY</code> and <code class="lang-kotlin">proxyTargetClass = false</code>. If the type of proxy mechanism is unexpected, the attributes can be set to the required values in a separate <code class="lang-kotlin">@EnableTransactionManagement</code> on the main configuration class or in a configuration file using <code class="lang-kotlin">spring.aop.proxy-target-class</code>.</p></div></div>
  </div>
  <div class="tabbedcontent">
    <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
    <div class="tabs-section-body">
      <div data-togglable="CONSTRUCTOR">
        <h2 class="">Constructors</h2>
        <div class="table"><a data-name="-890752462%2FConstructors%2F1261506227" anchor-label="ExposedAutoConfiguration" id="-890752462%2FConstructors%2F1261506227" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main"></a>
          <div class="table-row" data-togglable="CONSTRUCTOR" data-filterable-current=":exposed-spring-boot-starter:dokkaHtmlPartial/main" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-exposed-auto-configuration.html"><span>Exposed</span><wbr><span>Auto</span><wbr><span><span>Configuration</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-890752462%2FConstructors%2F1261506227"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-spring-boot-starter:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">applicationContext<span class="token operator">: </span><span data-unresolved-link="org.springframework.context/ApplicationContext///PointingToDeclaration/">ApplicationContext</span></span></span><span class="token punctuation">)</span></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="FUNCTION">
        <h2 class="">Functions</h2>
        <div class="table"><a data-name="500752865%2FFunctions%2F1261506227" anchor-label="databaseConfig" id="500752865%2FFunctions%2F1261506227" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main"></a>
          <div class="table-row" data-filterable-current=":exposed-spring-boot-starter:dokkaHtmlPartial/main" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="database-config.html"><span>database</span><wbr><span><span>Config</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="500752865%2FFunctions%2F1261506227"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-spring-boot-starter:dokkaHtmlPartial/main"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="org.springframework.context.annotation/Bean///PointingToDeclaration/"><span class="token annotation builtin">Bean</span></span></div><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="org.springframework.boot.autoconfigure.condition/ConditionalOnMissingBean///PointingToDeclaration/"><span class="token annotation builtin">ConditionalOnMissingBean</span></span><span class="token punctuation">(</span><span>value<span class="token operator"> = </span><span class="token punctuation">[</span><span><a href="../../../exposed-core/org.jetbrains.exposed.sql/-database-config/index.html">DatabaseConfig::class</a></span><wbr><span class="token punctuation">]</span></span><wbr><span class="token punctuation">)</span></div></div><span class="token keyword">open </span><span class="token keyword">fun </span><a href="database-config.html"><span class="token function">databaseConfig</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../../../exposed-core/org.jetbrains.exposed.sql/-database-config/index.html">DatabaseConfig</a></div><div class="brief "><p class="paragraph">Database config with default values</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-72076363%2FFunctions%2F1261506227" anchor-label="databaseInitializer" id="-72076363%2FFunctions%2F1261506227" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main"></a>
          <div class="table-row" data-filterable-current=":exposed-spring-boot-starter:dokkaHtmlPartial/main" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="database-initializer.html"><span>database</span><wbr><span><span>Initializer</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-72076363%2FFunctions%2F1261506227"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-spring-boot-starter:dokkaHtmlPartial/main"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="org.springframework.context.annotation/Bean///PointingToDeclaration/"><span class="token annotation builtin">Bean</span></span></div><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="org.springframework.boot.autoconfigure.condition/ConditionalOnProperty///PointingToDeclaration/"><span class="token annotation builtin">ConditionalOnProperty</span></span><span class="token punctuation">(</span><span>value<span class="token operator"> = </span><span class="token punctuation">[</span><span><span class="breakable-word"><span class="token string">"spring.exposed.generate-ddl"</span></span></span><wbr><span class="token punctuation">]</span><span class="token punctuation">, </span></span><wbr><span>havingValue<span class="token operator"> = </span><span class="breakable-word"><span class="token string">"true"</span></span><span class="token punctuation">, </span></span><wbr><span>matchIfMissing<span class="token operator"> = </span><span class="breakable-word"><span class="token boolean">false</span></span></span><wbr><span class="token punctuation">)</span></div></div><span class="token keyword">open </span><span class="token keyword">fun </span><a href="database-initializer.html"><span class="token function">databaseInitializer</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../../org.jetbrains.exposed.spring/-database-initializer/index.html">DatabaseInitializer</a></div><div class="brief "><p class="paragraph">Returns a <a href="../../org.jetbrains.exposed.spring/-database-initializer/index.html">DatabaseInitializer</a> that auto-creates the database schema, if enabled by the property <code class="lang-kotlin">spring.exposed.generate-ddl</code> in the application.properties file.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="105280845%2FFunctions%2F1261506227" anchor-label="springTransactionManager" id="105280845%2FFunctions%2F1261506227" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main"></a>
          <div class="table-row" data-filterable-current=":exposed-spring-boot-starter:dokkaHtmlPartial/main" data-filterable-set=":exposed-spring-boot-starter:dokkaHtmlPartial/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="spring-transaction-manager.html"><span>spring</span><wbr><span>Transaction</span><wbr><span><span>Manager</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="105280845%2FFunctions%2F1261506227"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-spring-boot-starter:dokkaHtmlPartial/main"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="org.springframework.context.annotation/Bean///PointingToDeclaration/"><span class="token annotation builtin">Bean</span></span></div></div><span class="token keyword">open </span><span class="token keyword">fun </span><a href="spring-transaction-manager.html"><span class="token function">springTransactionManager</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">datasource<span class="token operator">: </span><a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html">DataSource</a><span class="token punctuation">, </span></span><span class="parameter ">databaseConfig<span class="token operator">: </span><a href="../../../exposed-core/org.jetbrains.exposed.sql/-database-config/index.html">DatabaseConfig</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../../../spring-transaction/org.jetbrains.exposed.spring/-spring-transaction-manager/index.html">SpringTransactionManager</a></div><div class="brief "><p class="paragraph">Returns a <a href="../../../spring-transaction/org.jetbrains.exposed.spring/-spring-transaction-manager/index.html">SpringTransactionManager</a> instance using the specified <a href="spring-transaction-manager.html">datasource</a> and <a href="spring-transaction-manager.html">databaseConfig</a>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
      <div class="footer">
        <span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
      </div>
            </div>
        </div>
    </div>
</body>
</html>

